package edu.zut.cs.software.example.student.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import edu.zut.cs.software.example.domain.BaseEntity;

/**
 * 
 * @author chen ming yang
 * 
 * 
 */
@Table(name = "T_Student")
@Entity
public class Student extends BaseEntity<Long> {

	private static final long serialVersionUID = 3791620563007728106L;

	@Column
	private String clas;

	@Column
	private String grade;

	@Column
	private String major;

	@Column
	private String name;

	@Column
	private String number;
	
	/**
	 * password as a login password
	 */
	@Column
	private String password;
	
	@Column
	private String role;
	/**
	 * The status value
	 */
	@Column
	private boolean state;

	/**
	 * userId has uniqueness, as a login account
	 */
	@Column
	private String userId;

	public String getClas() {
		return clas;
	}

	public String getGrade() {
		return grade;
	}

	public String getMajor() {
		return major;
	}

	public String getName() {
		return name;
	}
	public String getNumber() {
		return number;
	}

	public String getPassword() {
		return password;
	}

	public String getRole() {
		return role;
	}
	public boolean getState() {
		return state;
	}

	public String getUserId() {
		return userId;
	}

	public void setClas(String clas) {
		this.clas = clas;
	}

	public void setGrade(String grade) {
		this.grade = grade;
	}

	public void setMajor(String major) {
		this.major = major;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public void setState(boolean state) {
		this.state = state;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Override
	public String toString() {
		return "Student [clas=" + clas + ", number=" + number + ", grade=" + grade + ", major=" + major + ", name="
				+ name + ", password=" + password + ", role=" + role + ", state=" + state + ", userId=" + userId + "]";
	}

	// @ManyToOne
	// @JoinColumn(name = "STUDENT_CATEGORY_ID") // T_Student add another column
	/**
	 * Many student objects relate to one category of student.
	 */
	// StudentCategory studentCategory;

}
